package day2;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class SchoolClassTest {
    public static void main(String[] args) {
        JClass j76 = new JClass();
        j76.name = "课工场76班";
        j76.startTime = "2021-9-15";
        j76.dirTeacher = "老李";
        j76.techTeacher = "老刘";
        ///j76.stus[0]="孙囡囡";
        Scanner in = new Scanner(System.in);
        int choice = 0;
        while (true) {
            System.out.println("1:添加新生，2：显示全部,3:查找学生，9：退出");
            choice = in.nextInt();
            if (choice == 1) {
                System.out.print("请输入新生姓名：");
                String sname = in.next();
                j76.add(sname);
            } else if (choice == 2) {
                j76.printInfor();
            } else if (choice == 3) {
                System.out.print("找谁？");
                String sname = in.next();
                boolean b = j76.search(sname);
                System.out.println(b ? "在这个班" : "不在!");
            } else if (choice == 9) {
                break;
            }
        }
        System.out.println("结束了。。。");
    }
}
